<!--SIF Implementation Specification 2.2-6 (March 17, 2008)-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://www.sifinfo.org/infrastructure/2.x" xmlns:sif="http://www.sifinfo.org/infrastructure/2.x" elementFormDefault="qualified">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="imports/xml/xml.xsd" />
  <xs:complexType name="BusRouteInfoType">
    <xs:annotation>
      <xs:documentation>This object contains all of the information about a bus route.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="BusInfoRefId" minOccurs="0" type="sif:IdRefType">
        <xs:annotation>
          <xs:documentation>GUID that identifies the bus that is associated with this route.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RouteNumber" minOccurs="0" type="xs:normalizedString">
        <xs:annotation>
          <xs:documentation>
							A unique identifier for the route.
							It may contain any printable ASCII character. F
							or instance, you may have route 16AM in the morning and a 16PM in the afternoon.
						</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RouteType" minOccurs="0">
        <xs:annotation>
          <xs:documentation>The type of route.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="Inbound" />
            <xs:enumeration value="Outbound" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="MaximumLoad" minOccurs="0" nillable="true" type="xs:unsignedInt">
        <xs:annotation>
          <xs:documentation>The maximum number of students who are on the bus at any point along this route.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Description" minOccurs="0" nillable="true" type="xs:string">
        <xs:annotation>
          <xs:documentation>Short explanation of the route. It may be used to designate an area, or used to color-code bus routes (the "orange" route).</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Name" minOccurs="0" nillable="true" type="sif:NameType">
        <xs:annotation>
          <xs:documentation>Name of the driver who drives this route.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RouteDurationLoaded" minOccurs="0" nillable="true" type="xs:duration">
        <xs:annotation>
          <xs:documentation>Refers to the amount of time that at least one student is riding the bus.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RouteDurationTotal" minOccurs="0" nillable="true" type="xs:duration">
        <xs:annotation>
          <xs:documentation>Includes time when no student is on the bus, including time driving to and from the garage, etc.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RouteDistanceLoaded" minOccurs="0" nillable="true">
        <xs:annotation>
          <xs:documentation>Refers to the distance the bus drives when at least one student is riding the bus.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="sif:XSDecimalOrEmpty">
              <xs:attribute name="Unit" use="required">
                <xs:annotation>
                  <xs:documentation>Distance unit used.</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:token">
                    <xs:enumeration value="km">
                      <xs:annotation>
                        <xs:documentation>kilometers</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="m">
                      <xs:annotation>
                        <xs:documentation>miles</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                  </xs:restriction>
                </xs:simpleType>
              </xs:attribute>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="RouteDistanceTotal" minOccurs="0" nillable="true">
        <xs:annotation>
          <xs:documentation>Includes the total distance driven for this route including to and from garage.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="sif:XSDecimalOrEmpty">
              <xs:attribute name="Unit" use="required">
                <xs:annotation>
                  <xs:documentation>Distance unit used.</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:token">
                    <xs:enumeration value="km">
                      <xs:annotation>
                        <xs:documentation>kilometers</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="m">
                      <xs:annotation>
                        <xs:documentation>miles</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                  </xs:restriction>
                </xs:simpleType>
              </xs:attribute>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="SIF_Metadata" minOccurs="0" nillable="true" type="sif:SIF_MetadataType" />
      <xs:element name="SIF_ExtendedElements" minOccurs="0" nillable="true" type="sif:SIF_ExtendedElementsType" />
    </xs:sequence>
    <xs:attribute name="RefId" use="required" type="sif:RefIdType">
      <xs:annotation>
        <xs:documentation>GUID that identifies this bus route.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:element name="BusRouteInfo" type="sif:BusRouteInfoType" />

</xs:schema>